package com.itheima.method.overload;

/**
 * @author Anomaly
 * @date 2022/12/1 16:13
 */

/**
 * 方法重载
 */
public class MethodDemo {
    public static void main(String[] args) {
        fire();
        System.out.println("---------------------");
        fire("岛国");
        System.out.println("---------------------");
        fire("美国", 6);
    }

    public static void fire() {
        System.out.println("无参方法");
    }

    public static void fire(String location) {
        System.out.println("location = " + location);
    }

    public static void fire(String location, int number) {
        System.out.println("location = " + location);
        System.out.println("number = " + number);
    }
}
